using System;
using System.Collections.Generic;
using System.Text;

namespace SourceFileProcessing
{
    class ALU
    {
        private UInt32 _A;
        private UInt32 _B;
        private UInt32 _result;
        private ALUCommand _command;
        private UInt32 _flags;

        public ALU()
        {
            _A = 0;
            _B = 0;
            _result = 0;
            _command = ALUCommand.NONE;
            _flags = 0;
        }

        public void Calculate()
        {
            switch (_command)
            {
                case ALUCommand.ADD:
                    {
                        _result = _A + _B;
                        //Set Flags
                        break;
                    }
                default:
                    break;
            }
        }

        public UInt32 A
        {
            get { return _A; }
            set { _A = value; }
        }

        public UInt32 B
        {
            get { return _B; }
            set { _B = value; }
        }

        public UInt32 Result
        {
            get { return _result; }
        }

        public UInt32 Flags
        {
            get { return _flags; }
        }

        public ALUCommand Command
        {
            set { _command = value; }
        }
    }

    enum ALUCommand : int
    {
        ADD,
        NONE
    }
}
